<li>
<?php echo $this->instance['title']?><br/>
<?php
    // get ac from top-view element (view helpers workaround)
    $ac = $this->getHelper('Partial')->view->ac;
    $entry = $this->instance['value'];
 if ($ac->isActionAllowed(PatternEngineAc::RIGHT_VIEW_STR)) : ?>
<?php
    $viewPatternUrl = new OntoWiki_Url(
	    array('controller' => 'patternmanager', 'action' => 'view'),
	    array()
	);
	$viewPatternUrl->setParam('pattern',$entry);
?>
<a class="minibutton" href="<?php echo $viewPatternUrl; ?>"><?php echo $this->_('view pattern'); ?></a>
<?php endif; ?>
<?php if ($ac->isActionAllowed(PatternEngineAc::RIGHT_EXEC_STR)) : ?>
<?php
    $execPatternUrl = new OntoWiki_Url(
       array('controller' => 'patternmanager', 'action' => 'exec'),
        array()
    );
    $execPatternUrl->setParam('pattern',$entry);
?>
<a class="minibutton" href="<?php echo $execPatternUrl; ?>"><?php echo $this->_('execute pattern'); ?></a>
<?php endif; ?>
</li>

